/**
 * 
 * @param {*} param0  children就是你要渲染组件
 * @returns 
 */
import {Navigate} from "react-router-dom"
function RouterAuth({children}){
    const token = localStorage.token
    if(token){
        return <>{children}</>
    }else{
        return <Navigate to="/login"></Navigate>
    }
}
export default RouterAuth